//
//  Character.h
//  DefenseSummoner
//
//  Created by vupham on 5/23/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "GameObject.h"

enum {
    NO_DIRECTION,
	DIRECTION_UP,
	DIRECTION_DOWN,
	DIRECTION_LEFT,
    DIRECTION_RIGHT
};

@interface GameCharacter : GameObject {
    float speed;
    int armor;
    int HP;
    int direction;
    int damage;
    BOOL inBattle;
    float attackRange;
    BOOL die;
    
    CCSprite *bloodSprite;
    float bloodMeterRate;
    CCSprite *bloodMeterBackground;
    CCSprite *bloodMeterRed;
}

@property (nonatomic) int HP;
@property (nonatomic) int damage;
@property (nonatomic) int direction;
@property (nonatomic) BOOL inBattle;

-(id)initCharacterWith:(GameLayer *)_gameLayer;
-(void)loadAnimationBasedOnDirection:(int)_direction;
-(void)animationMoveLeft;
-(void)animationMoveRight;
-(void)animationMoveUp;
-(void)animationMoveDown;
-(void)animationBattle;
-(void)animationDie;
-(void)animationHit;

-(void)dieCallBack;

-(void)drawBloodMeterWithLength:(float)_length width:(float)_width position:(CGPoint)_position;
-(void)updateBloodMeter;

@end
